﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
using System.Data;
using System.Runtime.Serialization;
using System.Text;
using System.Reflection;

namespace Vici.CoolStorage
{
    public abstract partial class CSObject<T> : CSObject
        where T : CSObject<T>
    {
        /// <summary>
        /// 根据ID获取对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static T ReadData(string id)
        {
            return string.IsNullOrEmpty(id) ? New() : ReadFirst("ID=@ID", "@ID", id);
        }
        public static T SaveDate(string id)
        {
            return null;
        }
    }
}
